/*! \file Primitivebuilder.h
 *	\brief <write description for Primitivebuilder.h>
 *
 *	created:	2010/07/12
 *	created:	12:7:2010   13:55
 *	filename: 	C:\src\tactics-engine\libs\gd\Primitivebuilder.h
 *	file path:	C:\src\tactics-engine\libs\gd
 *	file base:	Primitivebuilder
 *	file ext:	h
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

#ifndef _gd_PRIMITIVEBUILDER_H_
#define _gd_PRIMITIVEBUILDER_H_

#pragma once

namespace tt{
namespace gd{

class IndexBuffer;
class Primitive;
class VertexBuffer;
class VertexFormat;

class PrimitiveBuilder : NonCopyable
{
public:
	PrimitiveBuilder();
	virtual ~PrimitiveBuilder();

	SharedPtr<Primitive> createPrimitive();

	SharedPtr<IndexBuffer> createIndexBuffer(UInt count);
	SharedPtr<VertexBuffer> createVertexBuffer(const VertexFormat&, UInt count);

protected:
	virtual SharedPtr<Primitive> onCreatePrimitive() = 0;
	virtual SharedPtr<IndexBuffer> onCreateIndexBuffer(UInt count) = 0;
	virtual SharedPtr<VertexBuffer> onCreateVertexBuffer(const VertexFormat&, UInt count) = 0;
};

} //namespace gd
} //namespace tt
#include "PrimitiveBuilder.inl"

#endif //_gd_PRIMITIVEBUILDER_H_
